﻿using Inovout.Business;
using Inovout.Organizations.Model;

namespace Inovout.Organizations.Business
{
    public class ViewRootOrganizationUnitWorkItem : BaseWorkItem
    {
        protected override void Do()
        {
            OrganizationUnit rootOrganizationUnit = new OrganizationUnit { Name="江苏省国土局"};
            OrganizationUnit njOrg=new OrganizationUnit{Parent=rootOrganizationUnit,Name="南京市国土局"};
            Position ghPosition = new Position { Name = "规划科科长", Owner = njOrg };
            njOrg.Positions.Add(ghPosition);
            rootOrganizationUnit.Children.Add(njOrg);
            rootOrganizationUnit.Children.Add(new OrganizationUnit { Parent = rootOrganizationUnit, Name = "苏州市国土局" });
            rootOrganizationUnit.Children.Add(new OrganizationUnit{Parent=rootOrganizationUnit,Name="南通市国土局"});
            base.View("RootOrganizationUnit", rootOrganizationUnit);
        }
    }
}
